import http from '@/util/request'

export default {
    getEvaluationById: (id) => {
        return http({
            url: `api/evaluation/${id}`,
            method: 'get'
        })
    },
    
    getEvaluationList: (data) => {
        return http({
            url: 'api/evaluation/list',
            method: 'post',
            data
        })
    },
    
    addEvaluation: (data) => {
        return http({
            url: 'api/evaluation',
            method: 'post',
            data
        })
    },
    
    updateEvaluation: (data) => {
        return http({
            url: 'api/evaluation',
            method: 'put',
            data
        })
    },
    
    deleteEvaluation: (id) => {
        return http({
            url: `api/evaluation/${id}`,
            method: 'delete'
        })
    },
    
    getEvaluationPage: (pageNum, pageSize, data) => {
        return http({
            url: 'api/evaluation/page',
            method: 'post',
            params: {
                pageNum: pageNum,
                pageSize: pageSize
            },
            data
        })
    }
}
